/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx.mapper;

import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.mapping.StatementType;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>Project: mybatis2021 - StudentMapper
 * <p>Powered by webrx On 2021-07-19 14:45:20
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 15
 */
@Repository
public interface StudentMapper {
    public String ver();

    @Select("select * from t_student where id = #{id}")
    public Map<String,Object> queryById(int id);

    public int update();

    public int update(Map<String, Object> map);

    public int add(Map<String,Object> map);

    public List<String> showNames();
    public List<String> showNames(Map<String,Object> map);

    public List<String> querys(Map<String,Object> map);

    public List<Map<String,Object>> myselect();

    public int myupdate(Map<String,Object> map);


    /**
     * 执行存储过程
     * @param map
     * @return
     */
    @Update("{call upd()}") @Options(statementType = StatementType.CALLABLE)
    public int mydel(Map<String,Object> map);
}
